package mspdt.ubzuuch.mn;

import java.util.ArrayList;

import org.taptwo.android.widget.CircleFlowIndicator;
import org.taptwo.android.widget.ViewFlow;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class GalleryView extends Activity{
	
	private ViewFlow gallery;
	private CircleFlowIndicator indicator;
	private int gal_position = 0;
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.gallery_view);
		Bundle bundle = getIntent().getExtras();
		gal_position = bundle.getInt("pos");
		ArrayList<String> gal_images = bundle.getStringArrayList("array");
		
		gallery = (ViewFlow)findViewById(R.id.gallery_screen_viewflow);
		gallery.setAdapter(new GalleryAdapter(this, gal_images));
		indicator = (CircleFlowIndicator) findViewById(R.id.gallery_screen_indicator);
		gallery.setFlowIndicator(indicator);
		gallery.setSelection(gal_position);
	}
  	@Override
	public void onBackPressed() {
	   finish();
	   overridePendingTransition(R.anim.no_anim, R.anim.right_out);
	}
	

}
